package srgarcom;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

/**
 * Created by Rafael on 15/10/13.
 */
public class sgDishDetails extends Activity {
    TextView dishName;
    TextView dishDetail;
    TextView dishPrice;
    TextView confirmation;
    Button btnBuy;
    Button btnBack;

    public void onCreate(Bundle savedInstanceState) {
        this.onCreate(savedInstanceState);
        setContentView(R.layout.sgdishdetail);

        btnBuy = (Button) findViewById(R.id.btnBuy);
        btnBack = (Button) findViewById(R.id.btnBack);
        confirmation = (TextView) findViewById(R.id.confirmation);

        btnBuy.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                Intent i = new Intent(getApplicationContext(), sgMainMenu.class);
                startActivity(i);
                finish();
            }
        });
        btnBack.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                confirmation.setText("Compra efetuada com sucesso.");
                Intent i = new Intent(getApplicationContext(), sgMenu.class);
                startActivity(i);
                finish();
            }
        });
    }
}
